package com.rusefi.xml;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.rusefi.ScreenGenerator;

@XmlRootElement
public class ContentModel {
    private List<TopLevelMenuModel> menus = new ArrayList<>();

    @XmlElementWrapper
    @XmlElement(name = "keyword")
    public List<TopLevelMenuModel> getTopLevelMenus() {
        return menus;
    }

    @XmlAttribute
    public String getVersion() {
        return "Generated by " + ScreenGenerator.class + " on " + new Date();
    }

    @Override
    public String toString() {
        return "ContentModel{" +
                "menus=" + menus +
                '}';
    }
}
